{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "小写字母：abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\n",
      "\n",
      "大写字母：ABCDEFGHIJKLMNOPQRSTUVWXYZ\n",
      "\n",
      "数字字符：0123456789\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import string\n",
    "\n",
    "\n",
    "print(\"全部字母：{}\\n\".format(string.ascii_letters))\n",
    "print(\"大写字母：{}\\n\".format(string.ascii_uppercase))\n",
    "print(\"数字字符：{}\\n\".format(string.digits))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# 标准库【string】，字符串常量\n",
    "# https://docs.python.org/zh-cn/3/library/string.html\n",
    "\"\"\"\n",
    "string.ascii_letters\n",
    "下文所述 ascii_lowercase 和 ascii_uppercase 常量的拼连。 该值不依赖于语言区域。\n",
    "\n",
    "string.ascii_lowercase\n",
    "小写字母 'abcdefghijklmnopqrstuvwxyz'。 该值不依赖于语言区域，不会发生改变。\n",
    "\n",
    "string.ascii_uppercase\n",
    "大写字母 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'。 该值不依赖于语言区域，不会发生改变。\n",
    "\n",
    "string.digits\n",
    "字符串 '0123456789'。\n",
    "\n",
    "string.hexdigits\n",
    "字符串 '0123456789abcdefABCDEF'。\n",
    "\n",
    "string.octdigits\n",
    "字符串 '01234567'。\n",
    "\n",
    "string.punctuation\n",
    "由在 C 区域设置中被视为标点符号的 ASCII 字符所组成的字符串: !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~.\n",
    "\n",
    "string.printable\n",
    "由被视为可打印符号的 ASCII 字符组成的字符串。 这是 digits, ascii_letters, punctuation 和 whitespace 的总和。\n",
    "\n",
    "string.whitespace\n",
    "由被视为空白符号的 ASCII 字符组成的字符串。 其中包括空格、制表、换行、回车、进纸和纵向制表符。\n",
    "\"\"\""
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "c16b17713ab5f0f34b19b30e60a972ca5b8ae92225f60dc8412455a8851c7a93"
  },
  "kernelspec": {
   "display_name": "Python 3.8.10 32-bit",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
